Generic Monadic Constructs for Embedded Languages

نویسندگان

  • Anders Persson
  • Emil Axelsson
  • Josef Svenningsson
چکیده

We present a library of generic monadic constructs for embedded languages. It is an extension of Syntactic, a Haskell library for defining and processing generic abstract syntax. Until now, Syntactic has been mostly suited to implement languages based on pure, side effect free, expressions. The presented extension allows the pure expressions to also contain controlled side effects, enabling the representation of expressions that rely on destructive updates for efficiency. We demonstrate the usefulness of the extension by giving examples from the embedded language Feldspar which is implemented using Syntactic.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Resource-Safe Systems Programming with Embedded Domain Specific Languages

We introduce a new overloading notation that facilitates programming, modularity and reuse in Embedded Domain Specific Languages (EDSLs), and use it to reason about safe resource usage and state management. We separate the structural language constructs from our primitive operations, and show how precisely-typed functions can be lifted into the EDSL. In this way, we implement a generic framewor...

متن کامل

Visual Representation of 3D Language Constructs Specified by Generic Depictions

Several modeling domains make use of three-dimensional representations, e.g., the “ball-and-stick” models of molecules. Our generator framework DEViL3D supports the design and implementation of visual 3D languages for such modeling purposes. The front-end of a language implementation generated by DEViL3D is a dedicated 3D graphical structure editor, which is used to construct programs in that d...

متن کامل

Mso Deenable Text Languages ?

A text is a word together with an (additional) linear ordering. Each text has a generic tree representation, called its shape. We consider texts in a logical and an algebraic framework, and we prove that the classes of monadic second order deenable and of recognizable text languages coincide. In particular we demonstrate that the construction of the shape of a text can be formalized in terms of...

متن کامل

A Generic Framework for Specialization ( Abridged

We present a generic framework for specifying and implementing ooine partial evaluators. The framework provides the infrastructure for specializing higher-order programs with computational effects speciied through a monad. It performs sound specialization for all monadic instances and is evaluation-order independent. It subsumes most previously published partial evaluators for higher-order func...

متن کامل

Embedded interpreters

This is a tutorial on using type-indexed embedding/projection pairs when writing interpreters in statically-typed functional languages. The method allows (higher-order) values in the interpreting language to be embedded in the interpreted language and values from the interpreted language may be projected back into the interpreting one. This is particularly useful when adding command-line interf...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011